/// Coder: Jose Ricardo Mello Viana - 2008
/// Bugs? e-mail me: zezim.ricardo@gmail.com

/*
 * colorInterface.h
 *
 *  Created on: 07/09/2008
 *      Author: zezim
 */

#ifndef __COLORINTERFACE_H__
#define __COLORINTERFACE_H__

#include <iostream>
#include <vector>

#include "glslKernel.h"
#include "geomTypes/geomTypes.h"

#include <GL/glut.h>

using namespace std;

typedef float              Number;
typedef Vector<4, Number>  Color;

class ColorInterface {

public:
   /// Default constructor
   ColorInterface();

   /// Class Constructor
   ColorInterface(double w, double h);

   /// Default destructor
   virtual ~ColorInterface();

   /// Draw the interface
   void draw();

   Color getColor(int x, int y);

   void setVisible (bool v) { drawColorInterface = v; };

   bool isVisible() { return drawColorInterface; };

private:
   /// Window size
   double width;
   double height;

   vector<Color> colors;

   Color current;
   float ymin;
   int qtde;

   /// Draw Color Interface?
   bool drawColorInterface;
};

#endif /* __COLORINTERFACE_H__ */
